package com.sunny.查询.遍历查找;

import com.sunny.查询.Search;

public class ForEachSearch implements Search {
    @Override
    public int search(int[] array, int key, int low, int high) {
        for(int i = 0; i < array.length; ++i) {
            if(array[i] == key) {
                return i;
            }
        }

        return -1;
    }
}
